﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FishServe.Build.Module
{
    class Solution
    {
        private List<SolutionProject> _projects = new List<SolutionProject>();

        public List<SolutionProject> Projects
        {
            get { return _projects; }
        }

        public Solution()
        { }

        public SolutionProject FindProjectByName(string projectName)
        {
            foreach (SolutionProject project in _projects)
            {
                if (project.ProjectName == projectName)
                    return project;
            }
            return null;
        }

        public SolutionProject FindProjectByGuid(string projectGuid)
        {
            foreach (SolutionProject project in _projects)
            {
                if (project.ProjectGuid == projectGuid)
                    return project;
            }
            return null;
        }
    }
}
